<?php
  // no direct access
  defined( '_JEXEC' ) or die( 'Restricted access' );
  jimport('joomla.application.component.controller');
  include('base.php');

  class VideoController extends BaseController
  {
    var $_name = 'video';
    
    function get_type_instances(){
    
      $data = array();
      
      $type = JRequest::getVar('type');
      $vid  = $this->getModel('video', 'videomodel');
      
      $data = $vid->get_video_type_instances($type);
      
      $result  = "<select id='video_id' name='video_id'>";
      foreach($data as $id => $value)
        $result .= "<option value=$id>$value</option>";
      $result .= "</select>";
      echo $result;
    }
    
  }
?>
